//------------------------------------------------------------------------------
// <copyright file="Skill.cs" company="Damian Antonowicz">
//       copyright © 2010 Damian Antonowicz
// </copyright>
// <author>Damian Antonowicz</author>
// <email>poczta@damianantonowicz.pl</email>
//------------------------------------------------------------------------------

using System.ComponentModel;
namespace DotBeer.Business.Entities
{
    /// <summary>
    /// Contains information about skill.
    /// </summary>
    public class Skill : INotifyPropertyChanged
    {
        #region private members

        string skillName, skillLevel;

        #endregion

        #region properties

        public string Name
        {
            get { return this.skillName; }
            set
            {
                this.skillName = value;
                this.OnPropertyChanged("Name");
            }
        }

        public string Level
        {
            get { return skillLevel; }
            set
            {
                this.skillLevel = value;
                this.OnPropertyChanged("Level");
            }
        }

        public override string ToString()
        {
            return this.skillName;
        }

        #endregion

        #region constructors

        public Skill()
        {
        }

        #endregion

        #region private methods

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        /// Notify that property was changed.
        /// </summary>
        /// <param this.name="info">Changed property this.name</param>
        protected void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        #endregion

        #endregion
    }
}
